package cn.kbyue.openfeign.rest;

import cn.kbyue.openfeign.client.ProductFeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author XL
 * @version 0.1
 * @date 2021/8/12 21:40
 */
@RestController
@RequestMapping("/product")
public class ProductResource {

    @Resource
    ProductFeignClient productFeignClient;

    @GetMapping("")
    public ResponseEntity<String> get() {

        String get = productFeignClient.get();

        return ResponseEntity.ok("ResponseEntity < " + get + " >");
    }

}
